package com.ymttest.common.order.constants;


import org.joda.time.Period;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author luoshiqian 2016/5/11 11:47
 */
public class Constants {

    public static final String APP_ID = "userquery.trading.iapi.ymatou.com";

    public static final String LOG_PREFIX = "logPrefix";
    public static ConfigurableApplicationContext ctx;

    public static final DateTimeFormatter FORMATTER_YYYYMMDDHHMMSS = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
    public static final DateTimeFormatter FORMATTER_YYYYMMDD = DateTimeFormat.forPattern("yyyy-MM-dd");

    //获取运单是否已签收
    public static final String GET_DEMOSTIC_SIGNED_SUFFIX = "/api/LogisticsInfo/GetDomesticDeliveredByOrderId";

    public static final int MAX_PER_QUERY_COUNT = 200;

    /**
     * 卖家在买家已付款后多久未接单，买家可以取消 单位小时
     */
    public static Period TakeOrder = new Period(48,0,0,0);

    /**
     * 卖家已接单后多久未发起补款，买家可以退货退款 单位小时
     */
    public static Period EnablePostpay = new Period(72,0,0,0);

    /**
     * 卖家接单后多久未发货，买家可以退货退款 单位小时
     */
    public static Period Deliver = new Period(72,0,0,0);

    /**
     * 卖家发货后多久买家可以退货退款 单位天
     */
    public static Period ConfirmReceived = new Period(0,0,0,10,0,0,0,0);

    /**
     * 交易成交后多久内买家可以申请售后 单位天
     */
    public static Period Turnover = new Period(0,0,0,15,0,0,0,0);
}
